import request from "@/utils/request";
import PageResult from "@/types/global";
import { DictVO } from "@/api/system/dict";

const GENERATOR_BASE_URL = "/client";

const SearchShipAPI = {
  /** 获取数据表分页列表 */
  getShipList(param, data: searchShipQuery) {
    return request<any, PageResult<SearchShipVo[]>>({
      url: `${GENERATOR_BASE_URL}/ship/ship/list?` + param,
      method: "post",
      data,
      param,
    });
  },

  /** 获取字典列表 */
  getDictList() {
    return request<any, DictVO[]>({
      url: `${GENERATOR_BASE_URL}/auth/dict/homeTypeList`,
      method: "get",
    });
  },

  /** 获取船舶分类列表 */
  getShipCategoryList(params: SearchShipCategoryQuery) {
    return request<any, PageResult<SearchShipCategory[]>>({
      url: `${GENERATOR_BASE_URL}/ship/ship/shopCategory/list`,
      method: "get",
      params,
    });
  },
};

export default SearchShipAPI;

/** 代码生成预览对象 */
export interface searchShipQuery {}

/** 数据表分页对象 */
export interface SearchShipVo {}

/** 代码生成预览对象 */
export interface searchShipDictQuery {}

/** 数据表分页对象 */
export interface ShipDictVo {}

/** 代码生成预览对象 */
export interface SearchShipCategoryQuery {}

/** 数据表分页对象 */
export interface SearchShipCategory {}
